package Class_Object;

public class Class_Object_This {
    public int year;
    public int month;
    public int day;
    public void setDate(int year,int month,int day) {//方法只有一个,你怎么知道在给谁赋值?
        this.year = year;
        this.month = month;
        this.day = day;
        //year = year 这个表示局部变量对自己赋值
    }


    public static void main(String[] args) {
        Class_Object_This date = new Class_Object_This();
        date.setDate(1999,1,1);
        System.out.println(date.year + " " +date.month + " " + date.day);
        Class_Object_This date1 = new Class_Object_This();
        date1.setDate(1990,2,1);
        System.out.println(date1.year + " " +date1.month + " " + date1.day);


    }

}
